package com.lightdz.tshirtdz.model.api;

import java.util.Collection;

/**
 * Created by Administrator on 2018/8/20.
 */
public class ApiResponse<T>  {

    private String msg;
    private  T data;
    private boolean result;

    public ApiResponse(String msg, T data, boolean result) {
        this.msg = msg;
        this.data = data;
        this.result = result;
    }
    public ApiResponse(T data) {
        this.msg = "OK";
        this.data = data;
        this.result = true;
    }
    public ApiResponse(){
        this.msg = "OK";
    }

    public static ApiResponse getNoResponse(){
        return new ApiResponse("no response",null,false);
    }
    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public boolean isResult() {
        return result;
    }

    public void setResult(boolean result) {
        this.result = result;
    }
}
